package cn.leaf.uc.api.entity;

import cn.leaf.database.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *
 * description: 用户表
 *
 * @author twinkle leaf
 * @version v1.0.0
 * @since 2021-11-08 00:43:45
 * slogan: There are no two identical leaves in the world.
 *
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@TableName(value = "t_user")
public class UserEntity extends BaseEntity implements Serializable {
    /**
     * 账号
     */
    @TableField(value = "account")
    private String account;

    /**
     * 密码
     */
    @TableField(value = "`password`")
    private String password;

    /**
     * 昵称
     */
    @TableField(value = "nick_name")
    private String nickName;

    /**
     * 真名
     */
    @TableField(value = "real_name")
    private String realName;

    /**
     * 头像
     */
    @TableField(value = "avatar")
    private String avatar;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 手机
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 生日
     */
    @TableField(value = "birthday")
    private LocalDateTime birthday;

    /**
     * 性别
     */
    @TableField(value = "sex")
    private Integer sex;

    /**
     * 状态
     */
    @TableField(value = "`status`")
    private String status;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 逻辑删除
     */
    @TableField(value = "is_deleted")
    private String isDeleted;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    private String roleId;

    /**
     * 部门id
     */
    @TableField(value = "department_id")
    private Long departmentId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ACCOUNT = "account";

    public static final String COL_PASSWORD = "password";

    public static final String COL_NICK_NAME = "nick_name";

    public static final String COL_REAL_NAME = "real_name";

    public static final String COL_AVATAR = "avatar";

    public static final String COL_EMAIL = "email";

    public static final String COL_PHONE = "phone";

    public static final String COL_BIRTHDAY = "birthday";

    public static final String COL_SEX = "sex";

    public static final String COL_STATUS = "status";

    public static final String COL_REMARK = "remark";

    public static final String COL_INSERT_USER = "insert_user";

    public static final String COL_UPDATE_USER = "update_user";

    public static final String COL_INSERT_TIME = "insert_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";

    public static final String COL_TENANT_ID = "tenant_id";

    public static final String COL_ROLE_ID = "role_id";

    public static final String COL_DEPARTMENT_ID = "department_id";
}